<%@ page import="com.bookshop.entity.Book" %>
<%@ page import="com.bookshop.utils.StringUtil" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/5/23
  Time: 11:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
    <meta name="Robots" content="index,follow"/>
    <title>"第三波书店"-网上书店</title>
    <link href="css/global.css" rel="stylesheet" type="text/css"/>
    <link href="css/channel.css" rel="stylesheet" type="text/css"/>
    <link href="css/answer.css" rel="stylesheet" type="text/css"/>
</head>
</head>

<body>
<%--引入头部 begin--%>
<%@include file="header.jsp"%>
<%--引入头部 end--%>



<div id="container">
    <!--left content-->
    <%@include file="left.jsp"%>

    <%
        Book book = (Book)request.getAttribute("book");
        if (book!=null){
           double ddPrice= book.getUnitPrice()*0.59;
    %>
    <div class="book_view">
        <h1 class="b_title"><%=book.getTitle()%></h1>
        <div class="b_exa">
            <span class="book_group">丛书名：<%=StringUtil.sub(book.getTitle(),10)%></span>
            <span class="book_status">正在阅读（150 人），已经阅读（4521 人） <span><a href="#">放入书架</a></span> <a href="#">什么是书架？</a></span>
        </div>

        <!--book basic start-->
        <dl class="put_book">
            <dt>
                <img src="images/BookCovers/<%=book.getIsbn()%>.jpg"  height="200" width="150" alt="<%=book.getIsbn()%>">

                <div class="chakan"><img src="images/zoom.gif"/> <a class="gray878787a" href="#" name="bigpicture">点击查看大图</a>
                </div>
            </dt>
            <dd>
                <div id="book_editor">作　　者： <%=book.getAuthor()%> 著<br/>出 版 社： <%=book.getPublisher().getName()%></div>
                <ul id="book_attribute">
                    <li>出版时间： <%=book.getPublishDate()%></li>
                    <li>字　　数：<%=book.getContentDescription().length()%></li>
                    <li>库    存： <%=book.getSumStock()%></li>
                    <li>上架时间： <%=book.getSaleTime()%></li>
                    <li>价    格：  <%=book.getUnitPrice()%></li>
                    <li>纸　　张： 胶版纸</li>
                    <li>I S B N ： <%=book.getIsbn()%></li>
                    <li>包　　装： 平装</li>
                </ul>

                <div id="book_categroy">所属分类： <a href="#" target="_blank" class="blue12a">图书</a> >> <a href="#"
                                                                                                       target="_blank"
                                                                                                       class="blue12a"><%=book.getCategory().getName()%></a>
                    </div>

                <div id="book_price">
                    <span class="gray87">定价：<span class="del">￥<%=book.getUnitPrice()%></span></span>
                    <span class="red">当当价：￥<b><%=String.format("%.2f",ddPrice)%></b></span>
                    折扣：<span class="redc30">59折</span> 节省：￥<%= String.format("%.2f",book.getUnitPrice()-ddPrice)%>
                </div>

                <div id="book_point">
                    <span>送积分：<span id="pointsTag"><%=(int)ddPrice%></span></span>　<a target="_blank" href="#2">积分说明</a> <br/>
                    <a href="#"><img src="images/btn_goumai.gif" /></a>
                </div>

                <div id="book_count">
                    顾客评分：<span id="book_id_15">5</span>
                    共有商品评论0条 <a href="#">查看评论摘要</a>
                </div>

            </dd>
        </dl>
        <!--book basic end-->
        <!--book intro start-->

        <dl class="book_intro">
            <dt>内容简介</dt>
            <dd>
                <%=book.getContentDescription()%>
            </dd>
        </dl>
        <dl class="book_intro">
            <dt>目录</dt>
            <dd>
                <%=book.getToc()%>
            </dd>
        </dl>
        <!--book intro end-->

        <!--recommed start-->
        <div class="comm_answer">
            <!--review head start-->
            <div id="div_product_reviews">
                <div class="total_comm">
                    <div class="comm_title">
                        <h2>商品评论 共<em>814</em>条
                            <span class="look_comm"> (<a href="#" name='reviewList' target='_blank'>查看所有评论</a>)</span>
                        </h2>
                    </div>
                    <div class="total_body">
                        <div class="people_average">
                            <div class="average_left"><p>购买过的顾客平均评分</p><span class="a_red28b pd">4</span><span
                                    class="red_bold">星半</span><img src='images/star_red.gif'/><img
                                    src='images/star_red.gif'/><img src='images/star_red.gif'/><img
                                    src='images/star_red.gif'/><img src='images/star_redgray_big.gif'/>
                            </div>
                            <span class="span_jt" id="div_window_star"><input class="button_down1" value=""
                                                                              type="button"/></span>
                        </div>
                        <div id="div_product_summary">
                            <div class="people_heart">心情指数:<em>249</em>人 开心
                                <span id="div_emotion_hover">
                                    <input class="button_down1" type="button"/>
                                </span>
                            </div>
                            <div id="Div1" class="people_read">阅读场所:<em>180</em>人 床上
                                <span id="div_location_hover">
                                    <input class="button_down1" type="button"/>
                                </span>
                            </div>
                        </div>
                        <div class="write_comm">
                            <a id="reviewTipa" href="#"><img src="images/button_write_comm.gif" border="0" title="写评论"/></a>
                        </div>
                    </div>
                </div>
            </div>
            <!--review head end-->

            <!--the one reviews start-->
            <div class="comm_list">
                <h3>
                    <img src="images/label_1.gif" title="精彩评论"/><a href="#" target="_blank"
                                                                   name="reviewDetail">非常不错的一本书</a>
                    <span>发表于 2009-04-29 22:46</span>
                </h3>

                哦耶，终于拿到书了。&nbsp;<br/>实物比照片显示的要漂亮，颜色是看上去很舒服的红色。&nbsp;<br/>书很厚，是塑封的，里面有两张挂图，一张标准穴位图，一张足部反射区图，还有一张配套的光盘，用DVD机试了一下，是中里老师讲的。嗯，
            </div>
            <!--the one reviews end-->
        </div>
        <!--recommed end-->
    </div>
    <!--right content end-->
    <%}else{
            out.print("<script>alert('暂无图书信息详情！');history.go(-1);</script>");
        }%>


</div>

<%--引入网页底部 begin--%>
<%@include file="footer.jsp"%>
<%--引入网页底部 end--%>
</body>
</html>
